package com.ifengchao.job;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.ifengchao.service.SolrUserSearchService;

/**
 * @Author loki.xu
 * @Description:
 * @Date: Created in 上午9:35 2018/1/9
 * @Modified By
 */
@Component("SolrUserSearchJob")
public class SolrUserSearchJob {

	private static final Logger logger = Logger.getLogger(SolrUserSearchJob.class);

	@Autowired(required = false)
	private SolrUserSearchService solrUserSearchService;

	/**
	 * 搜索推送用户job
	 */
	public void executeTask() {
		System.out.println("-----进入推送用户job------");
		logger.info("-----进入推送用户job------");
		try {
			solrUserSearchService.pushUserSolrSearch();
		} catch (Exception e) {
			logger.error("推送用户job逻辑出错：", e);
		}
	}

}
